package cn.jzq.kotoba.modules.designpattern.strategy;

/**
 * @author jzq
 * @date 2019/2/12 13:09
 */
public class MuteDuck extends Duck{

    /**
     *  初始化muteDuck muteDuck是不会叫的
     */
    public MuteDuck() {
        super.setFlyBehavior(new FlywithWings());
        super.setQuackBehavior(new MuteQuack());
    }

    @Override
    void display() {
        doFly();
        doQuack();
    }
}
